#lang racket


(provide backend)


(define (load-autocad-backend mode)
  (cond ((eq? mode 'defer)
         (let ()
           (local-require "autocad/defer-mode.rkt")
           (load-and-bind-autocad)))
        (else
         (error 'load-autocad-backend "Not implemented"))))

(define (load-rhino-backend mode)
  (error 'load-rhino-backend "Not implemented"))

(define (backend cad (mode 'defer))
  (cond ((string=? cad "autocad")
         (load-autocad-backend mode))
        ((string=? cad "rhino")
         (load-rhino-backend mode))
        (else
         (error 'backend "Possible backends are autocad and rhino"))))